package com.softwinner.awbt.model;

/**
 * Created by xiasj on 17-12-20.
 */

public class BTDeviceInfo {
    private String name;
    private String address;

    public BTDeviceInfo() {

    }

    public BTDeviceInfo(String name, String address) {
        this.name = name;
        this.address = address;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }

        if (obj instanceof BTDeviceInfo) {
            String tmpAddress = ((BTDeviceInfo) obj).getAddress();
            if (this.address.equals(tmpAddress)) {
                return true;
            } else {
                return false;
            }

        } else {
            return false;
        }
    }
}
